package com.jojocalendar;

public class CalendarRandom {
	protected static int a = 16807;
	protected static int mod = 2147483647;
	
	protected static int[] next(int y, int m, int d) {
		
		int seed = (y << 16) + (m << 4) + d;
		
		int[] rnd = new int[5];
		seed = rnd[0] = Math.abs((seed*a+1)%mod);
		seed = rnd[1] = Math.abs((seed*a+2)%mod);
		seed = rnd[2] = Math.abs((seed*a+3)%mod);
		seed = rnd[3] = Math.abs((seed*a+4)%mod);
		seed = rnd[4] = Math.abs((seed*a+5)%mod);
		return rnd;
	}
}
